package com.springmvc.service;

import com.springmvc.dao.TeacherMapper;
import com.springmvc.entity.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * Created by 29047 on 2017/12/26.
 */
@Service
public class TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;

    public int deleteByPrimaryKey(Integer id){
        return teacherMapper.deleteByPrimaryKey(id);
    }

    public int insert(Teacher record){
        return teacherMapper.insert(record);
    }

    public int insertSelective(Teacher record){
        return teacherMapper.insertSelective(record);
    }

    public Teacher selectByPrimaryKey(Integer id){
        return teacherMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Teacher record){
        return teacherMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Teacher record){
        return teacherMapper.updateByPrimaryKey(record);
    }

    public ArrayList<Teacher> selectlist(){
        return teacherMapper.selectlist();
    }
}
